# ================= 导入filter组件 =================
from django_filters import FilterSet
from django_filters import filters
# ================= 导入数据类 =====================
from taskweb.models import TaskOrder


class TaskOrderFilter(FilterSet):
    place = filters.CharFilter(field_name="areaplace")
    area = filters.CharFilter(field_name="areaplace__brancharea")
    branch = filters.CharFilter(field_name="areaplace__brancharea__branch")

    class Meta:
        model= TaskOrder
        fields = ('tasktype','taskstatus','branch','area','place')